﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BinarySearchTree
{
    class BinarySearchTreeTest
    {
        static void Main(string[] args)
        {
            BinarySearchTree<int> tree = new BinarySearchTree<int>();

            tree.Add(5);
            tree.Add(5);
            tree.Add(6);
            tree.Add(2);
            tree.Add(3);
            tree.Add(10);
            tree.Add(8);
            tree.Add(20);
            tree.Add(9);

            //tree.RemoveAt(4);
            //tree.Remove(5);

            BinarySearchTree<int> treeClone = tree.Clone();
            tree.Remove(5);
            Console.WriteLine(tree);
            Console.WriteLine(treeClone);
        }
    }
}
